package com.cssw.fyzb.busi.service.user;

import com.cssw.fyzb.core.dao.user.UserSourceDao;
import com.cssw.fyzb.core.model.dodb.UserSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserSourceServiceImpl implements UserSourceService {

    @Autowired
    private UserSourceDao userSourceDao;

    @Override
    public Long save(Long userId, Integer sourceType, String sourceCode, String sourceName) {
        return userSourceDao.save(userId, sourceType, sourceCode, sourceName);
    }

    @Override
    public UserSource getBySourceCode(String sourceCode) {
        return userSourceDao.getBySourceCode(sourceCode);
    }

    @Override
    public UserSource getBySourceCode(Integer sourceType, String sourceCode) {
        return userSourceDao.getBySourceCode(sourceType, sourceCode);
    }

    @Override
    public UserSource getBySourceCode(Long userId, Integer sourceType) {
        return userSourceDao.getBySourceCode(userId, sourceType);
    }


}
